import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: "/detail",
    name: "detail",
    component: () => import("../views/home/detail.vue"),
  },
  // 登录
  {
    path: "/login",
    name: "login",
    component: () => import("../views/login/login.vue"),
  },
  {
    path: "/register",
    name: "register",
    component: () => import("../views/login/register.vue"),
  },
  {
    path: "/forget",
    name: "forget",
    component: () => import("../views/login/forget.vue"),
  },
  // vip
  {
    path: "/vip",
    name: "vip",
    component: () => import("../views/vip/index.vue"),
  },
  {
    path: "/vipDetails",
    name: "vipDetails",
    component: () => import("../views/vip/vipDetails.vue"),
  },
  // postAD
  {
    path: "/postAd",
    name: "postAd",
    component: () => import("../views/postAd/index.vue"),
  },
  //myAD
  {
    path: "/myAD",
    name: "myAD",
    component: () => import("../views/myAD/index.vue"),
  },
  // personal
  {
    path: "/personal",
    name: "personal",
    component: () => import("../views/personal/index.vue"),
  },
  {
    path: "/recharge",
    name: "recharge",
    component: () => import("../views/personal/recharge.vue"),
  },
  {
    path: "/changeMail",
    name: "changeMail",
    component: () => import("../views/personal/changeMail.vue"),
  },
  {
    path: "/changePassword",
    name: "changePassword",
    component: () => import("../views/personal/changePassword.vue"),
  },
  {
    path: "/demo",
    name: "demo",
    component: () => import("../views/personal/demo.vue"),
  },

]

const router = new VueRouter({
  mode: 'history',
  // base: '/h5/',
  routes
})

export default router
